How to identify purpose of text